/**
 * @file user_struct.h
 *
 */
#ifndef _USER_STRUCT_H
#define _USER_STRUCT_H

#ifdef __cplusplus
extern "C" {
#endif

#include "user_macro.h"
#include "stdint.h"

typedef struct
{
    uint32_t len;
    uint8_t data[BLE_DATA_SINGLE];
}ble_data_t;

typedef struct
{
    uint16_t head;
    uint16_t tail;
    ble_data_t data[BLE_SEND_MAX];
}ble_send_flag_t;

typedef struct
{
    uint16_t head;
    uint16_t tail;
    ble_data_t data[BLE_RECV_MAX];
}ble_recv_flag_t;

typedef struct
{
    uint16_t head;
    uint16_t tail;
    uint8_t data[UART_DATA_MAX][UART_DATA_SINGLE];
}uart_data_t;

typedef struct
{
	uint8_t status;
	uint8_t mode;
	uint32_t timing;
}led_status_t;

typedef struct
{
    uint8_t valid;
    uint32_t ip;
}ip_info_t;


typedef struct
{
    uint8_t valid;
}mqtt_status_t;


typedef struct
{
    float temperature;
    float huminity;
}temp_humi_t;

typedef struct
{
    uint8_t valid;
    uint8_t ssid[50];
    uint8_t pwd[50];
}wifi_info_flag_t;

typedef struct
{
    uint8_t valid;
    uint8_t server[50];
    uint32_t port;
}mqtt_info_flag_t;

typedef struct {
	uint8_t head;
	uint8_t tail;
	uint8_t data[MQTT_MESSAGE_QUEUE_MAX][MQTT_MESSAGE_SINGLE_MAX];
}mqtt_message_flag_t;


#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*USER_STRUCT*/
